import card from './card';
import clubClass from './class';
import employee from './employee';
import income from './income';
import message from './message';
import set from './set';

import game from './game';
import mall from './mall';
import logistics from './logistics';
import train from './train';

import campus from './campus';
import danGradeDeclare from './danGradeDeclare';
import payMembership from './payMembership';
import supplies from './supplies';
import face from './face';
import physicalCard from './physicalCard';
// import insurance from './insurance';
// import { getTenantId } from '@/lib/auth';

import mobileConfig from './mobileConfig';
const _r = [
  {
    path: '/:tenantId', // t__{tenantId}
    name: 'baserouter',
    meta: {
      deleteCode: true,
      icon: 'el-icon-notebook-2',
      title: 'hall'
    },
    // redirect: '/:tenantId/hall',
    component: () => import(/* webpackChunkName: "hall" */ '@/layout/hall'),
    children: [
      { // 道馆首页
        path: 'hall',
        name: 'Hall',
        meta: {
          title: 'hall',
          code: 'HallGeneral'
        },
        component: () => import(/* webpackChunkName: "common" */ '@/viewsHall/hall/index.vue')
      },
      { // 工作台
        path: 'workbench',
        name: 'Workbench',
        meta: {
          title: 'hallWorkbench',
          code: 'HallGeneral'
        },
        component: () => import(/* webpackChunkName: "common" */ '@/viewsHall/workbench/index.vue')
      },
      ...card,
      ...clubClass,
      ...employee,
      ...income,
      ...message,
      ...set,
      ...mall,
      ...game,
      // ...insurance,
      ...logistics,
      ...train,
      ...campus,
      ...danGradeDeclare,
      ...payMembership,
      ...supplies,
      ...face,
      ...mobileConfig,
      ...supplies,
      ...face,
      ...physicalCard
    ]
  },
  // {
  //   path: '/',
  //   redirect () {
  //     const _tenant = getTenantId();
  //     return `/t__${_tenant || ''}/hall`;
  //   }
  // },
  {
    path: '/',
    meta: {
      deleteCode: true,
      icon: 'el-icon-notebook-2',
      title: 'hall'
    },
    component: () => import(/* webpackChunkName: "hall" */ '@/viewsHall/version/index.vue')
  },
  {
    path: '/404',
    component: () => import(/* webpackChunkName: "common" */ '@/views/common/404')
  },
  {
    path: '*',
    component: () => import(/* webpackChunkName: "common" */ '@/views/common/404')
  }
];
export default _r;
